package dynamicJsonVerifyer;

import com.alibaba.fastjson.JSONObject;
import lombok.Data;

import java.util.Date;
import java.util.LinkedList;
import java.util.List;

@Data
public class VerifyMetadata{

    private List<Son> sons = new LinkedList<>();

    private Date versionTime;
    private String renewalKey;

    public void addSon(String jsonpath, JSONObject metadataJson){
        Son son = new Son();
        son.setJsonpath(jsonpath);
        son.setMetadataJson(metadataJson);
        sons.add(son);
    }

    public List<Son> getSons() {
        return sons;
    }

    @Data
    public class Son{
        private String jsonpath;
        private JSONObject metadataJson;
        private FieldVerifyer cacheFieldVerifyer;

    }
}
